package com.xigua._牛客;

import java.util.Scanner;

/**
 * @author LiRongHua
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2022/3/2910:17
 */
public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String input = in.nextLine();
        int a  = 0;
        for (int i = input.length()-1; i >=0 ; i--) {
              if (input.charAt(i) == ' ') break;
              a++;
        }
        System.out.println(a);
    }

}
